<h1>Angular Portfolio Items</h1>

<%= link_to "Create New Item", new_portfolio_url if logged_in?(:site_admin) %>

<% @angular_portfolio_items.each do |portfolio_item| %>
  <p><%= link_to portfolio_item.title, portfolio_show_path(portfolio_item) %></p>
  <p><%= portfolio_item.subtitle %></p>
  <p><%= portfolio_item.body %></p>
  <%= image_tag portfolio_item.thumb_image unless portfolio_item.thumb_image.nil? %>
  <%= link_to "Edit", edit_portfolio_path(portfolio_item) if logged_in?(:site_admin) %>
  <%= link_to 'Delete Portfolio Item', portfolio_path(portfolio_item), method: :delete, data: { confirm: 'Are you sure?' } if logged_in?(:site_admin) %>
<% end %>